﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IterationLife.Domains.Sports.Dtos.MTDatas;

namespace IterationLife.Domains.Sports.Dtos.MTSports
{
    /// <summary>
    /// 动量监测数据
    /// </summary>
    public class MTGatherLv1
    {
        public decimal? total_distance { get; set; }

        public int? turning_times { get; set; }

        public int? jump { get; set; }

        public int? bump_times { get; set; }

        public decimal? speed_max { get; set; }

        public decimal? speed_avg { get; set; }

        public decimal? heart_rate_max { get; set; }

        public decimal? heart_rate_avg { get; set; }

        public decimal? heart_rate_recovery { get; set; }

        public decimal? heart_rate_intensity_avg { get; set; }

        public decimal? heart_rate_intensity_max { get; set; }

        public int? bpm { get; set; }
    }


    public static class MTGatherLv1Extension
    {

        public static MTGatherData ToMTGatherData(this MTGatherLv1 mtGatherLv1)
        {
            MTGatherData result = new MTGatherData();
            result.TotalDistance = mtGatherLv1.total_distance;
            result.TurningTimes = mtGatherLv1.turning_times;
            result.JumpTimes = mtGatherLv1.jump;
            result.BumpTimes = mtGatherLv1.bump_times;
            result.SpeedMax = mtGatherLv1.speed_max;
            result.SpeedAvg = mtGatherLv1.speed_avg;
            result.HeartRateMax = mtGatherLv1.heart_rate_max;
            result.HeartRateAvg = mtGatherLv1.heart_rate_avg;
            result.LoadAvg = mtGatherLv1.heart_rate_intensity_avg;
            result.LoadMax = mtGatherLv1.heart_rate_intensity_max;
            return result;
        }
    }
}